class DeviceTests extends GroovyTestCase {

    void testValid() {
		def b = new Device(model:"Groovy in Action", manufactor:"Dierk Koenig", id:1)
        assert b.myValidate()
    }
	void testUpdate(){
		def b = new Device(model:"Groovy in Action", manufactor:"Dierk Koenig", id:1)
		b.setModel("changed")
		b.setManufactor("changed")
		assertEquals "changed", b.getModel()
		assertEquals "changed", b.getManufactor()
	}    
}